package com.tan.androidtest.java;

/**
 * 测试继承1
 */

public class TestExtend1 {

    public static void main(String[] args) {
        AA aa = new DD();

//        System.out.println(aa instanceof AA);
//        System.out.println(aa instanceof BB);
//        System.out.println(aa instanceof CC);
//        System.out.println(aa instanceof DD);

        aa.test();

        //x = 1 , y = 2 , z = 3
        //y＋＝z－－/＋＋x
        //y = 2 + 3 / 2

    }


}

class AA {

    public void test(){
        System.out.println("AA TEST");
    }

}

class BB extends AA {
}

class CC extends BB {
}

class DD extends CC {

    public void test(){
        System.out.println("DD TEST");
    }

}



